//
// Created by wangwanlong on 2024/11/1.
//

#ifndef MKAHYPAR_I_COARSENER_H
#define MKAHYPAR_I_COARSENER_H
#include "mkahypar/utils/typedef.h"
namespace mkahypar{
  class IRefiner;

  class ICoarsener {
  public:
    ICoarsener(const ICoarsener&) = delete;
    ICoarsener(ICoarsener&&) = delete;
    ICoarsener& operator= (const ICoarsener&) = delete;
    ICoarsener& operator= (ICoarsener&&) = delete;

    void coarsen(const HypernodeID limit) {
      coarsenImpl(limit);
    }

    bool uncoarsen(IRefiner& refiner,Metrics& best) {
      return uncoarsenImpl(refiner,best);
    }


    virtual ~ICoarsener() = default;

  protected:
    ICoarsener() = default;

  private:
    virtual void coarsenImpl(const HypernodeID limit) = 0;
    virtual bool uncoarsenImpl(IRefiner& refiner,Metrics& best) = 0;
  };
}
#endif //MKAHYPAR_I_COARSENER_H
